The present invention relates to a game apparatus and collision determination method for determining a collision of a moving object operated by a player with an obstacle, and information storage medium.
Driving game apparatuses are known in which a player viewing the game images displayed on the display operates a movable object and races the movable object with other movable objects. In such a game apparatus, when the moving object operated by the player hit against another moving object or side walls or the like, the moving object temporarily slows down or spins, or other representations are provided to produce a feel similar to a real race.
To provide these representation after a collision, conventional game apparatuses determines a collision of the player""s moving object (xe2x80x9cplayer""s vehiclexe2x80x9d) with another moving object (xe2x80x9cother vehiclexe2x80x9d) or obstacles such as side walls (the determination of the collision is hereinafter called a xe2x80x9chit checkxe2x80x9d). A prior-art hit check is disclosed in Japanese Patent Laid-Open No. 8-131656 titled xe2x80x9cGame apparatus and collision determination method.xe2x80x9d In this prior art, whether the player""s vehicle collides with an obstacle is determined at predetermined time intervals (for example, at intervals of {fraction (1/60)} seconds, which is the display intervals of a game image).
However, such a conventional hit check performed at predetermined time intervals may not allow for determining a collision accurately when the moving object runs at high speeds. FIGS. 14 and 15 show an example of a conventional hit check method in which whether the player""s vehicle collides with another vehicle at a halt ahead of the player""s vehicle is determined at intervals of {fraction (1/60)} seconds.
For example, if the velocity of the player""s vehicle is low and travels a distance less than or equal to the length of the vehicle in {fraction (1/60)} seconds, positions A to D of the player""s vehicle at intervals of {fraction (1/60)} seconds will be in a continuous region and portions where the player""s vehicle overlap the other vehicle will be created as shown in FIG. 14, therefore whether a collision occurs or not can be accurately determined. However, if the velocity of the player""s vehicle is fast and runs a distance longer than the length of vehicle in {fraction (1/60)} seconds, positions A to D of the player""s vehicle at intervals of {fraction (1/60)} seconds will not be in a continuous region and gaps will be created between them as shown in FIG. 15. If the other vehicle comes into one of these gaps, it cannot be determined that the collision of the player""s vehicle with the other vehicle has occurred even though it actually occurred, because the overlap of the player""s vehicle with the other vehicle is not created, and thus the player""s vehicle passes through the other vehicle. Also, if the other vehicle travels too fast with respect to the player""s vehicle, accurate determination of a collision cannot be performed and the player""s vehicle may pass through the vehicle.
The present invention is invented in view of these problems, and it is an object of the invention to provide a game apparatus, collision determination method, and information storage medium which allow an accurate determination of a collision of a movable object moving at high speed.
The game apparatus of the present invention determines by using game operation unit a collision of a player""s moving object with an obstacle at an intermediate position between a position corresponding to the time at which a game image was previously displayed and a position corresponding to the time at which the image will be displayed next, during the travel of the player""s moving object manipulated by using manipulation unit. Thus, even if the player""s moving object collides with an obstacle at an intermediate position between the previous and the next display time of the player""s moving object rather than at the previous display time and next display time of the player""s moving object, while the player""s moving object is traveling fast, an accurate determination of the collision can be accomplished.
Preferably, the game operation unit calculates, based on the relative distance traveled by the player""s moving object and the obstacle corresponding to the display interval of the game image, the relative coordinates of the player""s moving object and the obstacle used for one or more collision determinations performed at the intermediate position. by the use of collision determination position decision unit, and use the relative coordinates to determine a collision of the player""s moving object with the obstacle by the use of collision determination unit. If the relative distance between the player""s moving object and the obstacle which corresponds to the display interval of the game image is long, there is a possibility that the player""s moving object collides with the obstacle at an intermediate position, even though the player""s moving object did not collide with the obstacle at one of the display positions which exist discontinuously. In such a case, the collision of the player""s moving object with the obstacle can be detected without fail by performing the collision determination at the intermediate position as well.
Preferably, the game operation unit calculates a relative speed between the player""s moving object and the obstacle by using relative speed calculation unit and performs the collision determination at an intermediate position by using the collision determination position decision unit when the calculated relative speed exceeds a predetermined value. Increase in the relative speed means that the relative distance traveled by the player""s moving object and the obstacle increases. Therefore, when the relative speed increases, the collision determination is performed at an intermediate position in addition to the regular collision determinations to ensure that a collision at the intermediate position is detected. When the relative speed is low, the collision determination at the intermediate position is not performed, so that the processing load for performing such determination is lightened.
Preferably, the game operation unit further includes a table memory for storing a collision distance (ds) used for determining whether the player""s moving object will collides with an obstacle by relating the collision distance to the orientation (xcex81) in which the obstacle is positioned with respect to the direction which the player""s moving object faces and the orientation (xcex82) which the obstacle faces with respect to the direction which the player""s moving object faces. The collision determination unit determines that the player""s moving object collides with the obstacle when the distance between the player""s moving object and the obstacle with which it may collide does not exceed the collision distance ds corresponding to the same orientations xcex81, xcex82, so that the collision determination can be performed easily without fail by simply comparing the actual distance between the player""s moving object and the obstacle with the collision distance ds, even if the player""s moving object has a complicated shape.
Preferably, the game operation unit determines a collision by extracting an obstacle contained in a predetermined area centered at the player""s moving object from obstacles in virtual game space to determine a collision. In particular, the predetermined area is preferably set by taking at least one of the travel velocities of the player""s moving object and the obstacle into consideration. Because some obstacles are located at a position where a collision with the player""s moving object cannot occur depending on the travel speed of the player""s moving object, such obstacles are initially excluded from the collision determination so that the process can be simplified and the processing load on the game operation unit can be lightened.
The collision determination method of the present invention comprises the steps of: calculating, based on the relative distance traveled by the player""s moving object and the obstacle in relation to the display interval of the game image, the relative coordinates of the player""s moving object and the obstacle used for one or more collision determinations performed at an intermediate position(s) between a position corresponding to the previous display time of a game image and a position corresponding to the next display time of the image; and determining a collision of the player""s moving object with the obstacle by using the relative coordinates. By providing these steps, even if the player""s moving object collides with the obstacle at an intermediate position between the previous and the next display time of the player""s moving object rather than at the previous display time or next display time of the player""s moving object, while the player""s moving object is moving fast, an accurate determination of the collision can be accomplished.
The information storage medium of the present invention contains a program for determining a collision of a player""s moving object with an obstacle at an intermediate position between a position corresponding to the previous display time of a game image and a position corresponding to the next display time. In particular, the program preferably comprising a first program for calculating, based on the relative distance traveled by the player""s moving object and the obstacle in relation to the display interval of the game image, the relative coordinates of the player""s moving object and the obstacle used for one or more collision determinations performed at an intermediate position between a position corresponding to the previous display time of a game image and a position corresponding to the next display time, by executing the program contained in the information storage medium; and a second program for using the relative coordinates to determine a collision of the player""s moving object with the obstacle, by executing the program contained in the information storage medium. By executing the programs contained in the information storage medium, even if the player""s moving object collides with the obstacle at an intermediate position between the previous and the next display time of the player""s moving object rather than at the previous display time or next display time of the player""s moving object, while the player""s moving object is moving fast, an accurate determination of the collision can be accomplished.